package com.zsrt.java.day20161229.wrl.demo02;

import java.util.Scanner;

public class Teacher {
	private int age;
	private double salary;
	
	public void setAge(int age){
		this.age = age;
	}
	public int getAge(){
		return age;
	}
	
	public void setSalary(double salary){
		this.salary = salary;
	}
	public double getSalary(){
		return salary;
	}
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		System.out.print("输入年龄：");
		int age = sc.nextInt();
		System.out.print("\n输入工资：");
		double salary = sc.nextInt();
		Teacher huanglaoshi = new Teacher();
		huanglaoshi.setAge(age);
		huanglaoshi.setSalary(salary);
		System.out.println("年龄："+huanglaoshi.getAge()+" \n工资： "+huanglaoshi.getSalary());
		sc.close();
	}

}
